package indi.cc.demo.validator.exception;

import indi.cc.demo.validator.message.MessageResponse;

import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: BasicException <br/><br/>
 * Description:
 *
 * @author SAP
 */
public class BasicException extends RuntimeException{
    /**
     * serialVersionUID:
     *
     * @see
     * @since
     */
    private static final long serialVersionUID = 2188215790802610554L;
    private List<MessageResponse> messageList = new ArrayList<>(); //NOSONAR

    /**
     *
     * create an instance: MutiMessageException. Title: MutiMessageException <br/>
     * <br/>
     * Description: constructor without parameter
     */
    public BasicException()
    {
        super();
    }

    /**
     *
     * create an instance: MutiMessageException. Title: MutiMessageException <br/>
     * <br/>
     * Description: constructor without parameter msg
     *
     * @param msg
     *            error msg from i18n.properties
     */
    public BasicException(String msg)
    {
        super(msg);
    }

    public BasicException(final List<MessageResponse> messageList)
    {
        this.messageList = messageList;
    }

    /**
     * Get the messageList
     *
     * @return the messageList
     */
    public List<MessageResponse> getMessageList()
    {
        return messageList;
    }

    /**
     * Set the messageList
     */
    public void setMessageList(final List<MessageResponse> messageList)
    {
        this.messageList = messageList;
    }


}
